//
// Created by Semir on 2020/4/2.
//

#include <iostream>

using namespace std;

const int MAX_ROOM_NUM = 100010;
int roomNum;
long long value;
long cost[MAX_ROOM_NUM];

int main() {
    long stepNum = 0;
    long minCost = INT32_MAX;
    cin >> roomNum >> value;
    int i = 0;
    for (; i < roomNum; i++) {
        cin >> cost[i];
        if (cost[i] <= value) {
            value -= cost[i];
            stepNum++;
        }
        if (cost[i] < minCost) {
            minCost = cost[i];
        }
    }
    while (value >= minCost) {
        i = i % roomNum;
        if (cost[i] <= value) {
            value -= cost[i];
            stepNum++;
        }
        i++;
    }
    cout << stepNum << endl;
    return 0;
}